#博客详情页(其他用户登录）
import time

from selenium import webdriver
from selenium.webdriver.common.by import By

from common.Utils import  BlogDriver

class Blogdetil2:
    url=""
    driver=""
    def __init__(self):
        self.url="http://8.137.19.140:9090/blog_detail.html?blogId=91513"
        self.driver=BlogDriver.driver
        self.driver.get(self.url)
    def DetilRigText(self):
        #检查标题
        time.sleep(1)
        text= self.driver.find_element(By.CSS_SELECTOR,"body > div.container > div.right > div > div.title").text
        print(text)
          #时间
        text1=self.driver.find_element(By.CSS_SELECTOR,"body > div.container > div.right > div > div.date").text
        print(text1)
        #内容
        text2=self.driver.find_element(By.CSS_SELECTOR,"#detail > p").text
        print(text2)


